﻿// -----------------------------------------------------------------------
// <copyright file="Global.cs" company="">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace eGrocery.BaseDAL
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using eGrocery.BaseDAL.Model;
    using System.Web;

    /// <summary>
    /// TODO: Update summary.
    /// </summary>
    public sealed class Global
    {
        public static eGroceryEntities Context
        {
            get
            {
                string ocKey = "key_" + HttpContext.Current.GetHashCode().ToString("x");
                if (!HttpContext.Current.Items.Contains(ocKey))
                    HttpContext.Current.Items.Add(ocKey, new eGroceryEntities());
                return HttpContext.Current.Items[ocKey] as eGroceryEntities;
            }
        }

        public static int CurrentSessionUser
        {
            get
            {
                return 1;
            }
        }
    }
}
